package com.example.spring.bean;

import java.util.Arrays;

// set注入之注入数组
public class QianDaYe {
    // 简单类型数组
    private String[] aiHao;

    public void setAiHao(String[] aiHao) {
        this.aiHao = aiHao;
    }

    // 自定义类型数组
    private Friend[] friends;

    public void setFriends(Friend[] friends) {
        this.friends = friends;
    }

//    @Override
//    public String toString() {
//        return "QianDaYe{" +
//                "aiHao=" + Arrays.toString(aiHao) +
//                '}';
//    }


    @Override
    public String toString() {
        return "QianDaYe{" +
                "aiHao=" + Arrays.toString(aiHao) +
                ", friends=" + Arrays.toString(friends) +
                '}';
    }
}
